{include file="common_top.html"}
{include file="common_head.html"}
{include file="common_center.html"}
<div class="table_list">
	<h2>短网址列表</h2>
	<div class="search">
		<div class="fl">
			<form action="/index.php?a=suri&m=list" method="post">
				<span>任务名称：</span><input type="text" class="txt" name="task_title" value="{$params['task_title']}" />
				<span class="mgl20">原网址：</span><input type="text" class="txt" name="uri" value="{$params['uri']}" />
				<span class="mgl20">类型：</span><select class="sel" name="type">
					<option value="0">全部</option>
					{foreach from=$type_list item=v key=k}
					<option value="{$k}" {if $k == $params['type']}selected="selected"{/if}>{$v}</option>
					{/foreach}
				</select>
				<span class="mgl20">状态：</span><select class="sel" name="is_disable">
					<option value="-1" {if $params['is_disable'] != "0" && $params['is_disable'] != "1"}selected="selected"{/if}>全部</option>
					<option value="0" {if $params['is_disable'] == "0"}selected="selected"{/if}>正常</option>
					<option value="1" {if $params['is_disable'] == "1"}selected="selected"{/if}>禁用</option>
				</select>
				<input type="submit" class="mgl20 btn" value="查询" />
			</form>
		</div>
		{if 'SURI:EDIT'|in_array:$userpower}<div class="fr"><input type="button" class="btn link" value="添加" data-href="/index.php?a=suri&m=edit&id=0" /></div>{/if}
		<div class="cb"></div>
	</div>
	<table class="table_list">
		<tbody align="left" valign="top">
			<tr><th>编号</th><th>任务名称</th><th>短网址</th><th>原网址</th><th>访问量</th><th>类型</th><th>状态</th>{if 'SURI:EDIT'|in_array:$userpower}<th>操作</th>{/if}</tr>
			{if 'SURI:EDIT'|in_array:$userpower}
				{foreach from=$list.data item=v}
					<tr><td>{$v.id}</td><td>{$v.task_title}</td><td>{$v.key_format}</td><td>{$v.uri}</td><td class="count">{$v.count}</td><td>{$v.type_format}</td><td style="{if $v.is_disable}color:#FF0000{/if}">{$v.is_disable_format}</td><td>
						<a href="/index.php?a=suri&m=edit&id={$v.id}">编辑</a>
						<a href="javascript:void(0);" class="ajaxlink" data-url="/index.php?a=suri&m=clear&t=ajax&id={$v.id}">清零</a>
					</td></tr>
				{/foreach}
			{else}
				{foreach from=$list.data item=v}
					<tr><td>{$v.id}</td><td>{$v.task_title}</td><td>{$v.key_format}</td><td>{$v.uri}</td><td>{$v.count}</td><td>{$v.type_format}</td><td style="{if $v.is_disable}color:#FF0000{/if}">{$v.is_disable_format}</td></tr>
				{/foreach}
			{/if}
		</tbody>
	</table>
	{if $list.pager.last > $list.pager.first}
		<div class="pager">
			<a href="/index.php?a=suri&m=list&p={$list.pager.first}&{$list.pager.params}">首页</a>
			<a href="/index.php?a=suri&m=list&p={$list.pager.prev}&{$list.pager.params}">上一页</a>
			{for $i = $list.pager.start; $i <= $list.pager.end; $i++}
				{if $i == $list.pager.current}
					<a href="javascript:void(0);" class="current">{$i}</a>
				{else}
					<a href="/index.php?a=suri&m=list&p={$i}&{$list.pager.params}">{$i}</a>
				{/if}
			{/for}
			<a href="/index.php?a=suri&m=list&p={$list.pager.next}&{$list.pager.params}">下一页</a>
			<a href="/index.php?a=suri&m=list&p={$list.pager.last}&{$list.pager.params}">尾页</a>
		</div>
	{/if}
</div>
{include file="common_bottom.html"}
